package com.hbxz.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author yhb
 * @date 2021/6/8
 */

@Slf4j
@RestController
@RequestMapping("/stock")
public class StockController {

    @GetMapping("/minus/{number}")
    public String minusNuber(@PathVariable("number") Integer number, HttpServletRequest request){
        log.info("库存服务{} ----- 减少{}",request.getRequestURI(),1);
        return "库存+1";
    }
}
